﻿(function () {
    var win, container;

    ////显示公告
    function ShowAnnounce(data) {
        var option;
        if (data.Type == "html") {
            var container = $("<div></div>").html(data.Content);
            option = { target: container, title: "系统消息" };
        } else if (data.Type == "page") {
            option = { height: data.Height, width: data.Width, url: data.Url };
        }
        $.ligerDialog.open(option);
    }

    ////加载公告
    function loadAnnounceData(callback) {
        $.get("Handlers/SysAnnounce.ashx", { Func: "GetAnnounce" }, function (data) {
            if (data) {
                ShowAnnounce(data);
            }
        }, "json");
    }

    loadAnnounceData();
})()
